<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PlPN::PN - The Programmer's Notepad object</title>
<link rel="stylesheet" href="../PlPN.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>

<body>


<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<li><a href="#methods">METHODS</a></li>
	<li><a href="#copyright_and_licence">COPYRIGHT and LICENCE</a></li>
</ul>

<hr name="index" />
</div>
<!-- INDEX END -->

<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>PlPN::PN - The Programmer's Notepad object</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
        use PlPN qw(PN);
        
        PN-&gt;GetCurrentDocument;
        PN-&gt;GetGlobalOutputWindow;
        
        # etc.</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>Allows access to Programmer's Notepad functions from Perl.</p>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<dl>
<dt><strong><a name="getifaceversion" class="item">GetIFaceVersion()</a></strong></dt>

<dd>
<p>Gets the version of the Programmer's Notepad interface implemented by the
PlPN plugin.</p>
</dd>
<dt><strong><a name="getversion" class="item">GetVersion()</a></strong></dt>

<dd>
<p>Gets the version of the Programmer's Notepad executable.</p>
</dd>
<dt><strong><a name="addeventsink" class="item">AddEventSink($sink)</a></strong></dt>

<dt><strong><a name="removeeventsink" class="item">RemoveEventSink($sink)</a></strong></dt>

<dd>
<p>Adds or removes a <a href="./AppEventSink.html">PlPN::AppEventSink</a>. You only need this if you're
writing your own event sink, you don't need it if you're using the default
event sink via <a href="./registerevent_plpn__registerevent_plpn_registerevent.html">PlPN::RegisterEvent</a>.</p>
</dd>
<dt><strong><a name="getscriptregistry" class="item">GetScriptRegistry()</a></strong></dt>

<dd>
<p>Gets the <a href="./ScriptRegistry.html">PlPN::ScriptRegistry</a>, which allows you to register script
runners. You only need this if you're writing your own script runner, you
don't need it if you're using the default runner via
<a href="./registerscript_plpn__registerscript_plpn_registerscript.html">PlPN::RegisterScript</a>.</p>
</dd>
<dt><strong><a name="getoptionsmanager" class="item">GetOptionsManager()</a></strong></dt>

<dd>
<p>Gets the <a href="./Options.html">PlPN::Options</a> object, which allows access to Programmer's
Notepad settings, and also allows you to create your own settings.</p>
</dd>
<dt><strong><a name="getcurrentdocument" class="item">GetCurrentDocument()</a></strong></dt>

<dd>
<p>Gets the <a href="./Document.html">PlPN::Document</a> object representing the currently active
document.</p>
</dd>
<dt><strong><a name="getglobaloutputwindow" class="item">GetGlobalOutputWindow()</a></strong></dt>

<dd>
<p>Gets the <a href="./TextOutput.html">PlPN::TextOutput</a> object, which represents the
main output window. As of this writing, the extensions interface does not
allow access to the individual output window associated with a document.</p>
</dd>
<dt><strong><a name="getmainwindow" class="item">GetMainWindow()</a></strong></dt>

<dd>
<p>Gets the handle for the main Programmer's Notepad window. This is probably
not much use in ordinary Perl scripts, but if you use a GUI package (such as
<em>Win32::GUI</em>), you might want this value.</p>
</dd>
<dt><strong><a name="getusersearchoptions" class="item">GetUserSearchOptions()</a></strong></dt>

<dd>
<p>Gets the user search options, a <a href="./SearchOptions.html">PlPN::SearchOptions</a> object</p>
<p>See also <a href="./Options.html#getsearchoptions">PlPN::Options::GetSearchOptions</a>.</p>
</dd>
<dt><strong><a name="findinfiles" class="item">FindInFiles($options)</a></strong></dt>

<dd>
<p>Performs a search using the values from <code>$options</code>, a
<a href="./SearchOptions.html">PlPN::SearchOptions</a> object. Note that it does not return anything; the
matches are displayed via Programmer's Notepad.</p>
</dd>
<dt><strong><a name="inputbox" class="item">InputBox($title, $caption)</a></strong></dt>

<dd>
<p>Displays a message requesting user input, and returns that user input.
Returns <code>undef</code> if the user cancels, a string otherwise.</p>
</dd>
<dt><strong><a name="newdocument" class="item">NewDocument($scheme = undef)</a></strong></dt>

<dd>
<p>Creates a new empty document using the given scheme, or the default scheme
if scheme is not defined. Returns the associated
<a href="./Document.html">PlPN::Document</a> object.</p>
</dd>
<dt><strong><a name="opendocument" class="item">OpenDocument($filepath, scheme = undef)</a></strong></dt>

<dd>
<p>Opens a the given file using the given scheme, or the default scheme if no
scheme is not defined. Returns the associated <a href="./Document.html">PlPN::Document</a>
object.</p>
</dd>
<dt><strong><a name="addpluginmenuitems" class="item">AddPluginMenuItems($menu)</a></strong></dt>

<dd>
<p>Adds <code>$menu</code>, a <a href="./Menu.html">PlPN::Menu</a> object, to the <code>Extensions</code> menu in
Programmer's Notepad.</p>
<p>The extensions interface has no functionality to remove a menu.</p>
</dd>
<dt><strong><a name="addrecorder" class="item">AddRecorder($recorder)</a></strong></dt>

<dt><strong><a name="removerecorder" class="item">RemoveRecorder($recorder)</a></strong></dt>

<dd>
<p>Sets <code>$recorder</code>, a <a href="./Recorder.html">PlPN::Recorder</a> object, to receive
macro recording events. Currently Programmer's Notepad only supports one
recorder object at a time. The Perl implementation is a little more
flexible: the single C++ object will propagate the events to any number of
Perl objects.</p>
<p>Unfortunately, if another extension calls the C++ version of
<code>AddRecorder</code>, PlPN's recorder will no longer be active. You can,
however, call <code>AddRecorder</code> multiple times on the same Perl recorder; if
the recorder has already been added, it will not be added a second time, but
the C++ recorder will be activated again so that the associated Perl
recorder(s) will receive events.</p>
<p>The extensions interface has no functionality to remove a recorder.
Therefore, <code>RemoveRecorder</code> will only remove the Perl recorder; it will
not unset the C++ recorder.</p>
</dd>
</dl>
<p>
</p>
<hr />
<h1><a name="copyright_and_licence">COPYRIGHT and LICENCE</a></h1>
<p>Copyright (c) 2012 Sean Healy. All rights reserved.</p>
<p>This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.</p>

</body>

</html>
